package com.example.fp.cgc.entity

import com.baomidou.mybatisplus.annotation.IdType
import com.baomidou.mybatisplus.annotation.TableField
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName

/**
 * @since 2020-02-28
 * @author 蔡
 * @property uid 用户id
 * @property offline 是否显示离线用户
 * @property history 是否显示历史聊天列表
 * @property unread 是否在列表显示未读消息数量
 */
@TableName("user_setting")
class UserSetting() {
    @TableId(value = "id", type = IdType.AUTO)
    var id: Int = 0
    @TableField("uid")
    var uid: Int = 0
    @TableField("offline")
    var offline: Boolean = true
    @TableField("history")
    var history: Boolean = true
    @TableField("unread")
    var unread: Boolean = true

    constructor(uid: Int, offline: Boolean, history: Boolean, unread: Boolean) : this() {
        this.uid = uid
        this.offline = offline
        this.history = history
        this.unread = unread
    }

}